// 防抖
export const douFn = (fn: () => void, timeout = 1000) => {
  let timer: number | null = null;
  return () => {
    if (timer) clearTimeout(timer);
    timer = setTimeout(() => {
      fn();
    }, timeout);
  };
};
